<?php
	session_start();
	if (!isset($_SESSION['login'])) Header("Location:../../index.php");
	require_once('../controllers/UIs/UIInstrumento.php');
?>
<!--?xml version="1.0"?!-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="content-language" content="cs" />
    <meta name="robots" content="all,follow" />

    <meta name="author" content="All: ... [Nazev webu - www.url.cz]; e-mail: info@url.cz" />
    <meta name="copyright" content="Design/Code: Vit Dlouhy [Nuvio - www.nuvio.cz]; e-mail: vit.dlouhy@nuvio.cz" />

    <title>ASODECO encuestas</title>
    <meta name="description" content="..." />
    <meta name="keywords" content="..." />

    <link rel="index" href="./" title="Home" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="../../resources/css/main.css" />
    <link rel="stylesheet" media="print" type="text/css" href="../../resources/css/print.css" />
    <link rel="stylesheet" media="aural" type="text/css" href="../../resources/css/aural.css" />

	<script language="javascript">

		var nav = (document.layers) ? true : false

		function changeOn(Boton){
			if (!nav && Boton) Boton.src="../../resources/design/saveOn.gif" //modificamos el color
		}

		function changeClick(Boton){
			if (!nav && Boton) Boton.src="../../resources/design/saveOn.gif" //modificamos el color
		}

		function changeOff(Boton){
			if (!nav && Boton) Boton.src="../../resources/design/save.gif" //modificamos el color
		}


		// funciones equivalentes al trim
		function ltrim(s) {
		   return s.replace(/^\s+/, "");
		}

		function rtrim(s) {
		   return s.replace(/\s+$/, "");
		}

		function trim(s) {
		   return rtrim(ltrim(s));
		}

		// función de validación de los campos de texto
		function checkFields(frm)
		{
			nombre = new String();
			desc = new String();

		nombre = frm.nombre.value;
		desc = frm.desc.value;

			if ((trim(nombre)).length == 0 ||
				(trim(desc)).length == 0){
				alert("Debe introducir los datos correspondientes");
				return false;
			}

			return true;
		}
    </script>
</head>

<body id="www-url-cz">

<!-- Main -->
<div id="main" class="box">

    <!-- Header -->
    <div id="header">

        <!-- Logotyp -->
        <h1 id="logo"><!a href="./" title="Crystal X [Go to homepage]">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>ASODECO </strong><span></span><!/a></h1>
        <hr class="noscreen" />

        <!-- Quick links -->
        <div class="noscreen noprint">
            <p><em>Quick links: <a href="#content">content</a>, <a href="#tabs">navigation</a>, <a href="#search">search</a>.</em></p>
            <hr />
        </div>

    </div> <!-- /header -->

     <!-- Main menu (tabs) -->
     <div id="tabs" class="noprint">

            <h3 class="noscreen">Navigation</h3>
            <ul class="box">
                <li><a href="../../index.php">Inicio<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="empresas.php">Empresas<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li id="active"><a href="instrumentos.php">Instrumentos<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="aplicaciones.php">Aplicaciones<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="resultados.php">Resultados<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="usuarios.php">Usuarios<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="config.php">Configuración<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="sync.php">Sincronizar<span class="tab-l"></span><span class="tab-r"></span></a></li>
            </ul>
        <hr class="noscreen" />
     </div> <!-- /tabs -->

    <!-- Page (2 columns) -->
    <div id="page" class="box">
    <div id="page-in" class="box">



        <!-- Content -->
        <div id="content">

            <!-- Article -->
            <div class="article">
                <h2><span>Agregar Instrumento</span></h2>
                <br />
                <p class="info noprint">
                    <span class="cat"><b>Por favor complete los siguientes campos obligatorios (*): </b></span><span class="noscreen">,</span>&nbsp;&nbsp;&nbsp;
                </p>
             <form method="post" action="addinstrumentos_ui.php" id="frminstrumento" OnSubmit="return checkFields(this)">
				<table width="100%">
                	<tr>
                        <td width="70%"><label>(*) Nombre del Instrumento</label></td>
                        <td ><input name="nombre" type="text" maxlength="30" /></td>
                    </tr>
                    <tr>
                        <td width="70%"><label>(*) Descripci&oacute;n</label></td>
                        <td><textarea name="desc" cols="28" rows="6" wrap="physical" ></textarea></td>
                    </tr>
					<tr>
                        <td width="70%"><label>(*) Fuente</label></td>
                        <td ><input name="fuente" type="text" maxlength="100" /></td>
                    </tr>
                    <tr>
                    	<td colspan="2" align="right"><br /><input align="right" class="button" type="image" src="../../resources/design/save.gif"  onmouseover="changeOn(this);" onMouseOut="changeOff(this);"  onclick="changeClick(this);" name="btnLogin" /> </td>
					</tr>
				</table>
            </form>

				<br />
				<br />

            </div> <!-- /article -->

            <hr class="noscreen" />

        </div> <!-- /content -->

        <!-- Right column -->
        <div id="col" class="noprint">
            <div id="col-in">

                <!-- About Me -->
			<?php if (isset($_SESSION['login'])) { ?>
                <h3><span>Acerca de M&iacute;</span></h3>
                <div id="about-me">
                    <strong><?php echo $_SESSION['user_name'] ?></strong><br />
                    <?php echo $_SESSION['user_email'] ?><br />
                    Caracas, VEN<br /><br />
                    <a href="../controllers/logout.php">Cerrar Sesi&oacute;n</a></p>
                </div> <!-- /about-me -->
			 <?php } ?>

                <hr class="noscreen" />

                <!-- Category -->
                <h3 ><span>Opciones Generales</span></h3>

                <ul id="category">
                    <li><a href="opcion.php">Gestionar Opciones</a></li>
                    <li><a href="factor.php">Gestionar Factores</a></li>
                </ul>

                <hr class="noscreen" />

            </div> <!-- /col-in -->
        </div> <!-- /col -->

    </div> <!-- /page-in -->
    </div> <!-- /page -->

    <!-- Footer -->
    <div id="footer">
        <div id="top" class="noprint"><p><span class="noscreen">Back on top</span> <a href="#header" title="Back on top ^">^<span></span></a></p></div>
        <hr class="noscreen" />

        <p id="createdby">creado por <a href="http://www.asodeco.org">PSC Asodeco</a> <!-- DON´T REMOVE, PLEASE! --></p>
        <p id="copyright">&copy; 2010 <a href="mailto:contacto@asodeco.org">Asodeco</a></p>
    </div> <!-- /footer -->

</div> <!-- /main -->

</body>
</html>
